package web.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import web.pojo.ClassSchedule;

public interface ClassScheduleMapper {
    public List<ClassSchedule> fetchScheduleByWeekAndStudent(@Param("week") Integer week,
            @Param("teacher_id") Long teacher_id, @Param("id") Long id);

    public List<ClassSchedule> fetchScheduleByWeekAndTeacher(@Param("week") Integer week,
            @Param("teacherId") Long teacherId);

    public List<ClassSchedule> fetchScheduleList(@Param("teacherId") Long teacherId, @Param("courseId") Long courseId,
            @Param("classId") Long classId, @Param("classroomId") Long classroomId, @Param("week") Integer week);

    @Select("delete from class_schedule where id = #{id}")
    public void deleteSchedule(@Param("id") Long id);

    public void updateSchedule(@Param("id") Long id, @Param("teacherId") Long teacherId,
            @Param("classroomId") Long classroomId, @Param("week") Integer week, @Param("day") Integer day,
            @Param("section") Integer section);

    public void insertSchedule(@Param("course_id") Long courseId, @Param("class_id") Long classId,
            @Param("teacher_id") Long teacherId, @Param("classroom_id") Long classRoomId,
            @Param("week") String[] week,
            @Param("day") Integer day, @Param("section") Integer section);
}
